import yaml

def get_yaml_data(path):
    with open(path,mode='r',encoding='utf-8')as f:
        data = yaml.load(f,Loader=yaml.FullLoader)

    return data
if __name__ == '__main__':
    path = r'..\data\baidu_data.yml'
    print(get_yaml_data(path))